home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-06-17 | 1.8 KB | 73 lines | [TEXT/MSBB] |
- 'Cursor User
- 'This program loads cursors made by
- 'Dave Kelly's Basic School in the
- 'August 1985, MacTutor
-
- 'After loading the cursors,
- 'each cursor may be selected
- 'from the menu, thence displayed
- 'on the screen
-
- 'Copyright Dec. 1985, Don Fullmer
-
- WINDOW 1,"Cursors...",(2,45)-(510,340),1
- WINDOW OUTPUT 1
- araysize%=340 'Maximum of 10 cursors to load
- DIM entire%(araysize%)
- FOR i=1 TO 5:MENU i,0,0,"":NEXT 'clear menu bar
- MENU 1,0,1,"Control"
- MENU 1,1,1,"QUIT"
- MENU 2,0,1,"Load Cursors"
- MENU 2,1,1,"All..."
- ON MENU GOSUB checkmenu
- MENU ON
- loop:GOTO loop
- checkmenu:
- menunumber=MENU(0)
- menuitem=MENU(1):MENU
- ON menunumber GOSUB Control, LoadCursor
- RETURN
- Control:
- ON menuitem GOSUB QUIT
- RETURN
- LoadCursor: 'Current Cursor (CC)
- IF menuitem=1 THEN ON menuitem GOSUB allcursors:RETURN
- MENU OFF
- CCIndex%=(menuitem-2)*34
- SETCURSOR(VARPTR(entire%(CCIndex%)))
- MENU ON
- RETURN
- allcursors:
- CLS
- LOCATE 16,1
- a%=1
- count%=1
- ERASE entire% 'this feature lets us reload
- DIM entire%(araysize%) 'a new sequence of cursor files
- again:
- filename$=FILES$(1,"CURS") '"CURS" for files created by
- IF filename$="" THEN exitload ' Dave Kelly's program
- OPEN filename$ FOR INPUT AS #1
- FOR i=0 TO 33
- INPUT #1, entire%(index%)
- index%=count%+i
- NEXT
- CLOSE #1
- flnm$=RIGHT$(filename$,LEN(filename$)-(INSTR(filename$, ":")))
- MENU 2,a%+1,1,flnm$
- count%=count%+34
- IF LEN(flnm$) >11 THEN flnm$=LEFT$(flnm$,11)
- PRINT USING "###";a%;:PRINT " ";flnm$, 'keeping a visual
- IF a% MOD 3=0 THEN PRINT 'list of the files
- a%=a%+1
- IF a%=11 THEN exitload 'maximum of 10 files...
- GOTO again
- exitload:
- RETURN
-
- QUIT:
- MENU RESET
- WINDOW CLOSE 1
- END
-
-